package com.cauli.manage.notice.model.dto;

import com.cauli.model.dto.BaseDTO;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author Cauli
 * @date 2023-03-27 12:00
 * @description 公告添加参数
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "NoticeAddDTO", description = "公告添加参数")
public class NoticeAddDTO extends BaseDTO {
    @NotBlank(message = "公告标题不能为空")
    @ApiModelProperty("公告标题")
    private String title;

    @ApiModelProperty("html内容")
    private String content;

    @ApiModelProperty("markdown原文")
    private String markdownContent;

    @ApiModelProperty("平台（0管理端 1网盘）")
    private Integer platform;

    @ApiModelProperty("是否长期有效(0否 1是)")
    private Integer isLongValidData;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty("有效时间")
    private Date validDateTime;

    @NotNull(message = "公告状态不能为空")
    @ApiModelProperty("公告状态（0停用 1正常）")
    private Integer status;
}
